import Image


im = Image.open("pbc17.tif")
for i in list(im.getdata()):
    if i 